package guo.xungengmain.controller;

import guo.xungengcommon.vo.UserVo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import javax.servlet.http.HttpSession;

@Controller
public class firstController {

    @GetMapping({"/","/index","index.html"})
    public String toOkHtml(HttpSession httpSession, Model model){
        UserVo userVo = (UserVo) httpSession.getAttribute("user");

        System.out.println("main服务接收到了session中的数据: "+userVo);
        model.addAttribute("user",userVo);
        return "ok";
    }
}
